package com.tong.cloud.example.controller;

import com.tong.cloud.example.service.QueryGrantTypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@Api(value = "测试", tags = {"模拟lamba"})
@AllArgsConstructor
@RequestMapping("grant")
@RestController
public class GrantController {
    private final QueryGrantTypeService queryGrantTypeService;

    @ApiOperation(value = "类型操作")
    @GetMapping("type")
    public String type(
            @RequestParam("resourceType") String resourceType
    ) {
        return queryGrantTypeService.getResult(resourceType);
    }

}
